package edu.hziee.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import edu.hziee.mappers.UserMapper;
import edu.hziee.model.Blog;
import edu.hziee.model.User;

@Repository
public class UserDao {
	
	@Autowired
	private UserMapper userMapper;
	
	public void insertUser(User user){
		userMapper.insertUser(user);
	}
	
	public User selectUserById(int id){
		return userMapper.selectUserById(id);
	}
	
	public User selectUserByName(String userName){
		return userMapper.selectUserByName(userName);
	}
	
	public void updateUser(User user){
		userMapper.updateUser(user);
	}
	
	public void deleteUser(int id){
		userMapper.deleteUser(id);
	}
}
